package com.dalongxin.work.utils;

import android.content.Context;
import android.widget.Toast;

import com.dalongxin.work.BaseApplication;

public class ToastUtil {

    private static BaseApplication app;

    private ToastUtil() {
    }

    public static void init(BaseApplication app) {
        ToastUtil.app = app;
    }

    public static void showShort(String msg) {
        if (app == null) return;
        showShort(app, msg);
    }

    public static void showLong(String msg) {
        if (app == null) return;
        showLong(app, msg);
    }

    public static void showShort(Context context, String msg) {
        Toast.makeText(context, msg, Toast.LENGTH_SHORT).show();
    }


    public static void showLong(Context context, String msg) {
        Toast.makeText(context, msg, Toast.LENGTH_LONG).show();
    }
}
